import {
	request
} from "../utils/request"
import {
	getMD5Sign,
	getRandomText
} from "../utils/util.js";

/**
 * 支付接口
 */
export const wechatMini = (params) => {
	params.random = getRandomText();
	params.sign = getMD5Sign(params, true);
	return request({
		url: "/api/wechat/pay/mini/unified/order",
		method: "POST",
		data: params,
	})
}

export const syncOrder = (params) => {
	return request({
		url: "/api/order/sync?orderNo=" + params,
		method: "POST",
		// data: params,
	})
}